import request from "@/api/request";
import common from "@/lib/common";
let baseURL = "";
if (process.env.NODE_ENV === 'production') {
    baseURL = common.server.msn;
} else {
    baseURL = common.devServer.msn;
}

export default {
    weatheroOverview(latitude, longitude, success, fail) {
        request.get({
            url: `${baseURL}/msn/v0/pages/weather/overview?apikey=j5i4gDqHL6nGYwx5wi5kRhXjtf2c5qgFX9fzfk0TOo&ocid=msftweather&cm=zh-cn&it=edgeid&scn=APP_ANON&units=C&appId=9e21380c-ff19-4c78-b4ea-19558e93a5d3&wrapodata=false&includemapsmetadata=true&cuthour=true&lifeDays=2&lifeModes=18&includestorm=true&includeLifeActivity=true&distanceinkm=0&regionDataCount=20&orderby=distance&days=1&source=weather_csr&region=cn&market=zh-cn&locale=zh-cn&lat=${latitude}&lon=${longitude}`,
            success: success,
            fail: fail
        })
    },
}